import { GaRegExp, ruleInject, ruleInjectable } from "../InjectionRule";
import { blankRemove } from "../methods/blank-remove";

@ruleInjectable()
export default class whilelRule extends GaRegExp {

	@ruleInject() private calcRule!: GaRegExp;

	@ruleInject() private executeRule!: GaRegExp;

	public RuleInit() {
		this.ParseRule([
			"while", this.Supply("WHILE"), blankRemove, "\\(", blankRemove, "(", this.calcRule, ")", "\\)", blankRemove, "\\{", "(", this.executeRule, ")", "\\}"
		]);
	}

}
